using MediatR;
using Microsoft.AspNetCore.Http;
using RBAC.ErrorCode;

namespace RBAC.Write.Api.Application.Command.ERP.MaterialFile
{
    /// <summary>
    /// 导入物料基本档案命令
    /// </summary>
    public class ImportMaterialCommand : IRequest<APIResult<ImportResultDto>>
    {
        /// <summary>
        /// Excel文件
        /// </summary>
        public IFormFile File { get; set; }
    }

    /// <summary>
    /// 物料导入预览数据
    /// </summary>
    public class MaterialImportPreview
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; } = string.Empty;

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; } = string.Empty;

        /// <summary>
        /// 分类编码
        /// </summary>
        public string TypeCode { get; set; } = string.Empty;

        /// <summary>
        /// 规格型号
        /// </summary>
        public string ModelSpec { get; set; } = string.Empty;

        /// <summary>
        /// 主计量单位
        /// </summary>
        public string Unit { get; set; } = string.Empty;

        /// <summary>
        /// 供应方式：采购、自制、委外
        /// </summary>
        public string SupplyMode { get; set; } = string.Empty;

        /// <summary>
        /// 图纸号
        /// </summary>
        public string DrawingNo { get; set; } = string.Empty;

        /// <summary>
        /// 规格描述
        /// </summary>
        public string SpecDesc { get; set; } = string.Empty;

        /// <summary>
        /// 单价
        /// </summary>
        public decimal? Price { get; set; }

        /// <summary>
        /// 状态 1启用 0禁用
        /// </summary>
        public int Status { get; set; } = 1;

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; } = string.Empty;
    }
}